package edu.nf.ch10.demo1;

/**
 * @author CSY
 * @date 2025 - 04 - 17
 */
public class HandlerB extends AbstractHandler{
    @Override
    public void execute(int money) {
        if (money <= 5000){
            System.out.println("财务主管审批通过");
        }else{
            AbstractHandler nextHandler = getNextHandler();
            if (nextHandler != null){
                nextHandler.execute(money);
            }
        }
    }
}
